package test.密封类

fun main(args: Array<String>) {
    var s1 = Son.小小驴()
    var s2 = Son.小骡子()
    var s3 = Son.小小驴()

    val list = listOf<Son>(s1, s2, s3)
    for(v in list){
        if(v is Son.小小驴){
            v.sayHello()
        }
    }

}